<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../statics/layui/css/layui.css" type="text/css"/>

	<link type="text/css" rel="stylesheet" href="../statics/css/style.css" />
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <![endif]-->    
    <script type="text/javascript" src="../statics/js/jquery-1.11.1.min_044d0927.js"></script>
	<script type="text/javascript" src="../statics/js/jquery.bxslider_e88acd1b.js"></script>
    
    <script type="text/javascript" src="../statics/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../statics/js/menu.js"></script>    
        
	<script type="text/javascript" src="../statics/js/select.js"></script>
    
	<script type="text/javascript" src="../statics/js/lrscroll.js"></script>
    
    <script type="text/javascript" src="../statics/js/iban.js"></script>
    <script type="text/javascript" src="../statics/js/fban.js"></script>
    <script type="text/javascript" src="../statics/js/f_ban.js"></script>
    <script type="text/javascript" src="../statics/js/mban.js"></script>
    <script type="text/javascript" src="../statics/js/bban.js"></script>
    <script type="text/javascript" src="../statics/js/hban.js"></script>
    <script type="text/javascript" src="../statics/js/tban.js"></script>
    
	<script type="text/javascript" src="../statics/js/lrscroll_1.js"></script>
</head>
<body>  
<!--Begin Header Begin-->
<div class="soubg">
	<div class="sou">
        <span class="fr">
        	<span class="fl"><span id="userName">你好，请<a href="${pageContext.request.contextPath}/pre/Login.jsp">登录</a></span>&nbsp; <a href="${pageContext.request.contextPath}/pre/Regist.jsp" style="color:#ff4e00;">免费注册</a>&nbsp; </span>
        </span>
    </div>
</div>
<!--End Header End--> 
<!--Begin Login Begin-->
<div class="log_bg">	
    <div class="top">
        <div class="logo"><a href="${pageContext.request.contextPath}/pre/index.jsp"><img src="../statics/images/logo.png" /></a></div>
    </div>
	<div class="login">
    	<div class="log_img"><img src="../statics/images/l_img.png" width="611" height="425" /></div>
		<div class="log_c">
        	<form>
            <table border="0" style="width:370px; font-size:14px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr height="50" valign="top">
              	<td width="55">&nbsp;</td>
                <td>
                	<span class="fl" style="font-size:24px;">登录</span>
                	
                    <span class="fr">还没有商城账号，<a href="${pageContext.request.contextPath}/pre/Regist.jsp" style="color:#ff4e00;">立即注册</a></span>
                </td>
              </tr>
              <tr height="70">
                <td>用户名</td>
                <td><input type="text" value="" class="l_user" id="loginnames" name="loginName"/></td>
              </tr>
              <tr height="70">
                <td>密&nbsp; &nbsp; 码</td>
                <td><input type="password" value="" class="l_pwd" id="passwords" name="password"/></td>
              </tr>
              <tr>
              	<td>&nbsp;</td>
                <td style="font-size:12px; padding-top:20px;">
                	<span style="font-family:'宋体';" class="fl">
                    	<label class="r_rad"><input type="checkbox" checked/></label><label class="r_txt">请保存我这次的登录信息</label>
                    </span>
                    <span class="fr"><a href="#" style="color:#ff4e00;">忘记密码</a></span>
                </td>
              </tr>
              <tr height="60">
              	<td>&nbsp;</td>
                <td><input type="button" value="登录" class="log_btn" id="ques"/></td>
              </tr>
            </table>
            </form>
        </div>
    </div>
</div>
<!--End Login End--> 
<!--Begin Footer Begin-->

<div class="btmbg">
    <div class="btm">
        备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 易买网商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br />
        <img src="../statics/images/b_1.gif" width="98" height="33" /><img src="../statics/images/b_2.gif" width="98" height="33" /><img src="../statics/images/b_3.gif" width="98" height="33" /><img src="../statics/images/b_4.gif" width="98" height="33" /><img src="../statics/images/b_5.gif" width="98" height="33" /><img src="../statics/images/b_6.gif" width="98" height="33" />
    </div>    	
</div>
<!--End Footer End -->    

<script src="../statics/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="../statics/layui/layui.all.js" type="text/javascript"></script>
<script>
	$(function(){
	function isNull(){
		var name=$("#loginnames").val();
		var pass=$("#passwords").val();
	    if(name==""){
  			layer.msg('姓名不能为空!',{icon:0,time:2000},function(){});       
			//alert("姓名不能为空!");
		}else if(pass==""){
			layer.msg('密码不能为空!',{icon:0,time:2000},function(){});
		    //alert("密码不能为空!");
		}else{
		    return true;
		}
	}
		$("#ques").click(function(){
			if(isNull()){
			 var name=$("#loginnames").val();
		     var pass=$("#passwords").val();
		     $.ajax({
		     	"url":"../UserServlet",
		     	"type":"get",
		     	"data":"opr=login2&loginName="+name+"&password="+pass,
		     	"dataType":"json",
		     	"success":function(data){
		     		if(data="true"){
		     			layer.msg('登录成功!',{icon:1,time:2000},function(){});
		     			location.href="../pre/index.jsp";
		     		}else{
		     			layer.msg('登录失败!',{icon:2,time:2000},function(){});
		     		}
		     	}
		     });
			}
		});
	});
</script>
</body>


<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
